<template>
  <div class="wrap">
    <div class="header">
      <user-check-box></user-check-box>
      <div class="mgt20">
        <el-select
          v-model="queryParams.type"
          placeholder="请选择"
          size="small"
          class="header-select"
        >
          <el-option label="全部仓库" value=""></el-option>
          <el-option :label="getWareHouseName()" :value="1"></el-option>
          <el-option label="官方仓" :value="2"></el-option>
        </el-select>
      </div>

    </div>
    <div class="content">
      <el-table
        v-loading="loading"
        :data="data"
        border
      >
        <el-table-column
          prop="image"
          label="货件单号"
          align="center"
          width="120"
        >
        </el-table-column>
        <el-table-column
          prop="title"
          label="用户名"
          align="left"
          min-width="250"
        >
        </el-table-column>
        <el-table-column
          prop="goodsNum"
          label="店铺名"
          align="center"
          min-width="150"
        >
        </el-table-column>
        <el-table-column
          prop="num"
          label="入库箱子数量"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="underWayNum"
          label="仓库"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="usedNum"
          label="制单时间"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="usedNum"
          label="入库时间"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="usedNum"
          label="入库SKU种数"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="usedNum"
          label="入库商品数量"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="usedNum"
          label="入库管理员"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="op"
          label="操作"
          align="center"
        >
          <template slot-scope="{row}">
            <el-button>修改库存</el-button>
            <el-button @click="delShipment">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <div class="page-wrap">
        <el-pagination
          @current-change="getData"
          :current-page.sync="queryParams.page"
          :page-sizes="[10, 20, 50]"
          :page-size="queryParams.pageSize"
          :total="total"
          layout="total, sizes, prev, pager, next, jumper"
        >
        </el-pagination>
      </div>
    </div>

  </div>
</template>

<script>
import UserCheckBox from "@/views/shipment/components/UserCheckBox.vue";
import {getWareHouseName} from "@/utils/common";

export default {
  name: "confirmShipmentList",
  components: {UserCheckBox},
  data(){
    return {
      queryParams: {
        type: '',
      },
      loading: false,
      data: [
        {}
      ],
      total: 0,
    }
  },
  methods:{
    getWareHouseName,
    delShipment(){
      this.$warning(`删除后将无法恢复，请与用户核对确认该货件信息`,{
        title: '删除当前货件？',
      })
        .then(() => {


        })
    },
  },
}
</script>

<style scoped>
.wrap {
  padding: 30px 30px;
  .header{
    //display: flex;
    //justify-content: space-between;
  }
  .content{
    padding: 20px 0 0;
  }
}
</style>
